import { useSetState } from "ahooks";

export function useServerData<T = any>(): [T, (val: T) => void] {
    return useSetState<T>(Reflect.get(window, 'SERVER_DATA') || {})
}
